<!DOCTYPE html>
<html>
  <script src="../../resources/js-test.js"></script>
  <body>
    <script type="text/javascript">
      description("Test navigator.requestMIDIAccess API in WebView");
      window.jsTestIsAsync = true;

      function onMIDIError(errorMessage) {
        testPassed('requestMIDIAccess error, reason: ' + errorMessage);
        finishJSTest();
      }

      function onMIDISuccess(stream) {
        testFail('access was granted but should not have been.');
        finishJSTest();
      }

      navigator.requestMIDIAccess({sysex:true}).then(
          onMIDISuccess, onMIDIError);
    </script>
  </body>
</html>